package com.An.service;

import com.An.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @auther AnYang
 * @date 2022/4/14 19:42
 **/

public interface StudentService {
	//获取学生的所有的课程
	List<StudentCourse> getStudentCourseBySno(Integer sno);

	//根据学生账号查询账号信息
	StudentUser getUserInfoByUserId(@Param("userid") String userId);

	//根据学号查询账号信息
	StudentUser getUserInfoBySno(Integer sno);

	//根据班级查询老师
	List<ClassTeacher> getTeacherByClass(@Param("sclass") String sclass);

	List<StuCourseInfo> getCourseByClass(@Param("class_name") String sclass);

	//寝室信息
	List<Dormitory> getDormList();

	//换寝室的理由
	List<StudentApplication> getUpdateStuDormApplication();

	//根据名字查询课程
	Course getCourseByName(@Param("cname") String cname);

	//根据学号差住校学生
	StudentDorm getStudentDormBySno(Integer sno);

	//插入住校学生
	boolean addStudentDorm(StudentDorm student);

	//学生换寝申请
	boolean addStuDormApplication(StudentApplication studentApplication);

	//撤销住校申请
	boolean deleteStudentDormIsNull(Integer sno);

	//走读申请
	boolean updateStudentDormSign(Integer sign, Integer sno);

	//修改学生账号信息
	boolean updateUserInfo(@Param("user") StudentUser user);

	//申请理由
	boolean addApplication(Apply apply);

	//删除申请
	boolean deleteApplication(Integer sno, Integer sign);
}